package no.ntnu.fp.model.events;

import java.util.ArrayList;
import java.util.List;
import no.ntnu.fp.model.Appointment;
import no.ntnu.fp.model.Employee;

@SuppressWarnings("serial")
public class AppointmentsChangedEvent extends ModelEvent {
	private final Employee emp;
	private final List<Appointment> oldAppointments, newAppointments;
	
	public AppointmentsChangedEvent(Object source, Employee emp, 
			List<Appointment> oldAppointments, List<Appointment> newAppointments) {
		super(source);
		this.emp = emp;
		this.oldAppointments = new ArrayList<Appointment>(oldAppointments);
		this.newAppointments = new ArrayList<Appointment>(newAppointments);
	}

	public Employee getEmp() {
		return emp;
	}

	public List<Appointment> getOldAppointments() {
		return new ArrayList<Appointment>(oldAppointments);
	}

	public List<Appointment> getNewAppointments() {
		return new ArrayList<Appointment>(newAppointments);
	}
}
